/*
 * WaveHeightIPFactory.cpp
 *
 *  Created on: 03/01/2012
 *      Author: agustin
 *
 *
 * OpenVC License
 *
 * Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
 * Copyright (C) 2009, Willow Garage Inc., all rights reserved.
 * Third party copyrights are property of their respective owners.
 *
 * This software is provided by the copyright holders and contributors "as is" and
 * any express or implied warranties, including, but not limited to, the implied
 * warranties of merchantability and fitness for a particular purpose are disclaimed.
 * In no event shall the Intel Corporation or contributors be liable for any direct,
 * indirect, incidental, special, exemplary, or consequential damages
 * (including, but not limited to, procurement of substitute goods or services;
 * loss of use, data, or profits; or business interruption) however caused
 * and on any theory of liability, whether in contract, strict liability,
 * or tort (including negligence or otherwise) arising in any way out of
 * the use of this software, even if advised of the possibility of such damage.
 */

#include "WaveHeightIPFactory.h"

#include "DebugUtil.h"
#include "WaveHeightAnalyzer.h"
#include "CannyBorderDetector.h"
#include "MiddlePointClipping.h"
#include "PerspectiveRectifier.h"



ImageProcessor *WaveHeightIPFactory::getImageProcessor(int ip)
{
	ImageProcessor *result = 0;
	switch(ip){
	case IP_RECTIFIER:
		result = new PerspectiveRectifier;
		break;
	case IP_CLIPPING:
		result = new MiddlePointClipping;
		break;
	case IP_BORDER_DETECTOR:
		result = new CannyBorderDetector;
		break;
	case IP_WH_ANALYZER:
		result = new WaveHeightAnalyzer;
		break;

	default:
		debug("Error: Invalid ImageProcessor: %d\n", ip);
		return 0;
	}

	return result;
}
